<?php

class Application_Model_Contact extends Zend_Db_Table_Abstract
{
    protected $_name= 'Message' ;//table name

    function createMessages($senderName , $senderEmail , $subject , $message , $receiverEmail="admin@os.iti.gov.eg")
    {
        $Message=array('sender_name'=>$senderName , 'sender_email'=>$senderEmail , 'cat_id'=>$subject ,'message'=>$message, 'reciever_email'=>$receiverEmail);
        $this->insert($Message);
    }
    
    
    function listMessages()
    {
        
        return $this->fetchAll()->toArray();
    }
    
    
    
    function deleteMessage($id)
    {
        $this->delete("message_id = $id");

    }
}

